package com.ruoyi.passenger.service.impl;

import java.util.List;
import com.ruoyi.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.passenger.mapper.TbPassengerTempBlacklistMapper;
import com.ruoyi.passenger.domain.TbPassengerTempBlacklist;
import com.ruoyi.passenger.service.ITbPassengerTempBlacklistService;

/**
 * 手机号临时黑名单Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-08-18
 */
@Service
public class TbPassengerTempBlacklistServiceImpl implements ITbPassengerTempBlacklistService 
{
    @Autowired
    private TbPassengerTempBlacklistMapper tbPassengerTempBlacklistMapper;

    /**
     * 查询手机号临时黑名单
     * 
     * @param tempId 手机号临时黑名单主键
     * @return 手机号临时黑名单
     */
    @Override
    public TbPassengerTempBlacklist selectTbPassengerTempBlacklistByTempId(Long tempId)
    {
        return tbPassengerTempBlacklistMapper.selectTbPassengerTempBlacklistByTempId(tempId);
    }

    /**
     * 查询手机号临时黑名单列表
     * 
     * @param tbPassengerTempBlacklist 手机号临时黑名单
     * @return 手机号临时黑名单
     */
    @Override
    public List<TbPassengerTempBlacklist> selectTbPassengerTempBlacklistList(TbPassengerTempBlacklist tbPassengerTempBlacklist)
    {
        return tbPassengerTempBlacklistMapper.selectTbPassengerTempBlacklistList(tbPassengerTempBlacklist);
    }

    /**
     * 新增手机号临时黑名单
     * 
     * @param tbPassengerTempBlacklist 手机号临时黑名单
     * @return 结果
     */
    @Override
    public int insertTbPassengerTempBlacklist(TbPassengerTempBlacklist tbPassengerTempBlacklist)
    {
        tbPassengerTempBlacklist.setCreateTime(DateUtils.getNowDate());
        return tbPassengerTempBlacklistMapper.insertTbPassengerTempBlacklist(tbPassengerTempBlacklist);
    }

    /**
     * 修改手机号临时黑名单
     * 
     * @param tbPassengerTempBlacklist 手机号临时黑名单
     * @return 结果
     */
    @Override
    public int updateTbPassengerTempBlacklist(TbPassengerTempBlacklist tbPassengerTempBlacklist)
    {
        return tbPassengerTempBlacklistMapper.updateTbPassengerTempBlacklist(tbPassengerTempBlacklist);
    }

    /**
     * 批量删除手机号临时黑名单
     * 
     * @param tempIds 需要删除的手机号临时黑名单主键
     * @return 结果
     */
    @Override
    public int deleteTbPassengerTempBlacklistByTempIds(Long[] tempIds)
    {
        return tbPassengerTempBlacklistMapper.deleteTbPassengerTempBlacklistByTempIds(tempIds);
    }

    /**
     * 删除手机号临时黑名单信息
     * 
     * @param tempId 手机号临时黑名单主键
     * @return 结果
     */
    @Override
    public int deleteTbPassengerTempBlacklistByTempId(Long tempId)
    {
        return tbPassengerTempBlacklistMapper.deleteTbPassengerTempBlacklistByTempId(tempId);
    }
}
